using System.Collections.Generic;
using KnessetCore.Laws;
using KnessetCore.Parser;

namespace KnessetCore.Members
{
	/// <summary>
	/// Allows manipulation on the private laws legislated by knesset members.
	/// </summary>
	public interface IPrivateLawView
	{
		/// <summary>
		/// Add a private law to the laws that were legislated by this member. If this knesset
		/// member already had this law in his laws collection then this request is ignored.
		/// </summary>
		/// <param name="parsedLaw">Law to add to this member. The Member field of the Law struct
		/// is ignored, that is, even if Member is different from this member then the law will still
		/// be added.</param>
		/// <exception cref="LawException">Error while adding law to the laws table.</exception>
		/// <exception cref="KnessetMembersException">Error while associating this law with the knesset member.</exception>
		/// <exception cref="MemberDoesNotExistException">Member does not exist.</exception>
		void AddPrivateLaw(ParsedLaw parsedLaw);
		/// <summary>
		/// Get all laws that were legislated by this member.
		/// </summary>
		/// <returns>A collection contating all laws legislated by this member.</returns>
		/// <exception cref="MemberDoesNotExistException">Member does not exist.</exception>
		/// <exception cref="LawException">Error while retrieving law information.</exception>
		ICollection<ParsedLaw> GetLaws();
		/// <summary>
		/// Get total number of laws legislated by this member.
		/// </summary>
		/// <returns>Total number of laws legislated by this member.</returns>
		/// <exception cref="MemberDoesNotExistException">Member does not exist.</exception>
		/// <exception cref="LawException">Error while retrieving law information.</exception>
		uint GetLawCount();
		/// <summary>
		/// Is a law was legislated by this specific knesset member.
		/// </summary>
		/// <param name="knessetNumber">The knesset number in which the law was legislated.</param>
		/// <param name="lawID">The law id as specified by the knesset site.</param>
		/// <returns>True if was legislated by this member, false otherwise.</returns>
		/// <exception cref="MemberDoesNotExistException">Member does not exist.</exception>
		/// <exception cref="LawException">Error while retrieving law information.</exception>
		bool IsLawLegislatedByKnessetMember(uint knessetNumber, uint lawID);
	}
}